$OpenBSD: patch-tests_makefile,v 1.2 2015/03/27 11:34:23 sthen Exp $

#1, gmake-ism

#2, unsure if this is a test bug or a command-line parser bug, but the -p
value isn't read in the original order; same on Linux

#3, "head --bytes=-20" means "display most of the file, but trim last 20 bytes"
which isn't easily replicable with base tools, so just use ghead from coreutils

--- tests/makefile.orig	Wed May 14 19:17:54 2014
+++ tests/makefile	Tue Dec 30 14:41:31 2014
@@ -27,12 +27,12 @@ rebuild: render-rebuild \
 UTILS = ../util
 PICS = ../pic
 
-GIFS := $(shell ls ../pic/*.gif)
+GIFS := `ls ../pic/*.gif`
 
 # Test decompression and rendering by unpacking images,
 # converting them to RGB, and comparing that result to a check file.
 render-regress:
-	@for test in $(GIFS); \
+	for test in $(GIFS); \
 	do \
 	    stem=`basename $${test} | sed -e "s/.gif$$//"`; \
 	    if echo "Testing RGB rendering of $${test}" >&2; \
@@ -103,10 +103,10 @@ giffilter-regress:
 
 giffix-rebuild:
 	@echo "Rebuilding giffix test."
-	@head --bytes=-20 <$(PICS)/treescap.gif | $(UTILS)/giffix 2>/dev/null | $(UTILS)/gifbuild -d >giffixed.ico
+	@ghead --bytes=-20 <$(PICS)/treescap.gif | $(UTILS)/giffix 2>/dev/null | $(UTILS)/gifbuild -d >giffixed.ico
 giffix-regress:
 	@echo "giffix: Testing giffix behavior"
-	@head --bytes=-20 <$(PICS)/treescap.gif | $(UTILS)/giffix 2>/dev/null | $(UTILS)/gifbuild -d | diff -u giffixed.ico -
+	@ghead --bytes=-20 <$(PICS)/treescap.gif | $(UTILS)/giffix 2>/dev/null | $(UTILS)/gifbuild -d | diff -u giffixed.ico -
 
 gifinto-regress:
 	@echo "gifinto: Checking behavior on short files."
